package com.uni.dao;

import com.uni.pojo.Product;
import com.uni.pojo.ProductExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface ProductMapper {
    long countByExample(ProductExample example);

    int deleteByExample(ProductExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Product record);

    int insertSelective(Product record);

    List<Product> selectByExampleWithBLOBs(ProductExample example);

    List<Product> selectByExample(ProductExample example);

    Product selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByExampleWithBLOBs(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByExample(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKeyWithBLOBs(Product record);

    int updateByPrimaryKey(Product record);
    // 分割线

    List<Product> selectProductWithProviderBySome(@Param("map") Map<String, String> paramMap);

    List<Product> selectProductWithTypeBySome(@Param("map") Map<String, String> paramMap);

    Product selectWithProviderAndTypeById(Long id);

    int updateToDown(Long prodId);

    int updateToUp(Long prodId);

    int updateToDowns(List<Long> prodId);

    int updateToUps(List<Long> prodId);

    Product selectProductByName(String name);

    int deleteProductByProviderIds(@Param("ids") List<Long> ids);
}